package whisper.support.user.config;

import com.zaxxer.hikari.HikariDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * Created by JT on 2018/5/27
 */
@Configuration
public class DBConfig {

    @Bean(name = "DATASOURCE_USER")
    @ConfigurationProperties(prefix = "user.datasource")
    public DataSource userDataSource() {
        return new HikariDataSource();
    }

}
